<?php
/**
 * Created by PhpStorm.
 * User: sunlight
 * Date: 2018/11/21
 * Time: 19:46
 */

namespace app\api\controller\V1;

use app\api\controller\Common;

class Cat extends Common{

    /**
     * 栏目接口
     */
    public function read(){
        $cats=config('cat.lists');

        $result[]=[
            'catid' => 0,
            'catname' => '首页'
        ];

        foreach ($cats as $catid=>$catname){
            $result[] = [
                'catid' => $catid,
                'catname' => $catname
            ];
        }

        return show(config('code.success'),'ok',$result,200);
    }

}